<script setup>
import { ref } from "vue";
import { useRouter } from "vue-router";

const routvanist = useRouter();

let num = ref(0);

const myclick = function(coms) {
    num.value++
    console.log(num);
    routvanist.push(coms)
};
</script>

<template>
  <div>
    <h1>这是App 根组件: vanement-plus</h1>
    <van-button @click="myclick('buttonmy')">按钮</van-button>
    <van-button @click="myclick('tablemy')">表格</van-button>
    <van-button @click="myclick('containermy')">布局容器</van-button>
    <van-button @click="myclick('iconmy')" icon="van-icon-vaneme">icon图标</van-button>
    <van-button @click="myclick('datemy')" ><van-icon><clock/></van-icon>时间-日期</van-button>
    <van-button @click="myclick('formmy')" ><van-icon><vanementPlus /></van-icon>form表单</van-button>
    <van-button @click="myclick('loadingmy')" ><van-icon><vanementPlus /></van-icon>加载中</van-button>
    <van-button @click="myclick('tabmy')" ><van-icon><vanementPlus /></van-icon>tab页</van-button>
    <van-button @click="myclick('vanswipemy')" ><van-icon><vanementPlus /></van-icon>Swipe轮播图</van-button>
    <hr />
    <router-view></router-view>
  </div>
</template>

<style scoped>
.red {
  color: red;
}
</style>
